package com.bgIntlgn.client.entity.jishubu;

import yuhuibear.poat.annotations.action.AutoGenerateValue;
import yuhuibear.poat.annotations.relation.Field;
import yuhuibear.poat.annotations.relation.Table;
import yuhuibear.poat.object.bean.Bean;

/**
 * 材质实体
 * 
 */
@Table(name = "materials", constrain = "")
public class Material implements Bean {

	@AutoGenerateValue(skipOnNull = true, sqlToGet = "select currval('materials_id_seq')")
	@Field(name = "id", type = "bigserial", constrain = "primary key")
	private Long id;

	/**
	 * 唯一名字
	 */
	@Field(name = "name", type = "varchar(60)", constrain = "unique")
	private String name;

	/**
	 * 材质编码
	 */
	@Field(name = "code", type = "varchar(20)", constrain = "unique")
	private String code;

	/**
	 * 密度。
	 */
	@Field(name = "density", type = "float", constrain = "not null")
	private double density;

	/**
	 * 损耗修正.
	 */
	@Field(name = "density", type = "float", constrain = "default 0")
	private double spillage;

	@Field(name = "comment", type = "varchar(500)", constrain = "")
	private String comment;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public double getDensity() {
		return this.density;
	}

	public void setDensity(double density) {
		this.density = density;
	}

	public double getSpillage() {
		return this.spillage;
	}

	public void setSpillage(double spillage) {
		this.spillage = spillage;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

}
